home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / growthre.sit / Growth Records / background_2571.txt < prev    next >
Text File  |  1988-02-06  |  28KB  |  1,152 lines

  1. -- background: 2571 from stack: in
  2. -- bmap block id: 17126
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openBackground
  8.   global identification
  9.   go to card identification
  10.  
  11. end openBackground
  12.  
  13.  
  14. on goalign
  15.   get the scroll of field "Date"
  16.   set the scroll of field "Age" to it
  17.   set the scroll of field "Weight" to it
  18.   set the scroll of field "Height" to it
  19.   set the scroll of field "Phallus Size" to it
  20.   set the scroll of field "Growth Velocity" to it
  21.   set the scroll of field "Bone Ages" to it
  22.   set the scroll of field "Testes Volume" to it
  23.   set the scroll of field "Breasts" to it
  24.   set the scroll of field "Pubic hair" to it
  25. end goalign
  26.  
  27. on OpenCard
  28.   if field "units" is empty then
  29.     put "true true" into field "units"
  30.   end if
  31.   get word 2 of field "units"
  32.   if it then
  33.     set visible of background button "cm" to true
  34.     set visible of background button "in" to false
  35.   else
  36.     set visible of background button "cm" to false
  37.     set visible of background button "in" to true
  38.   end if
  39.   get word 1 of field "units"
  40.   if it then
  41.     set visible of background button "kgs" to true
  42.     set visible of background button "lbs" to false
  43.   else
  44.     set visible of background button "kgs" to false
  45.     set visible of background button "lbs" to true
  46.   end if
  47. end OpenCard
  48.  
  49. on CloseCard
  50.   put the visible of background button "cm" into units
  51.   put " " before units
  52.   put the visible of background button "kgs" before units
  53.   put units into field "units"
  54. end CloseCard
  55.  
  56.  
  57.  
  58. -- part 5 (button)
  59. -- low flags: 00
  60. -- high flags: 0000
  61. -- rect: left=241 top=317 right=342 bottom=268
  62. -- title width / last selected line: 0
  63. -- icon id / first selected line: 1014 / 1014
  64. -- text alignment: 1
  65. -- font id: 0
  66. -- text size: 12
  67. -- style flags: 0
  68. -- line height: 16
  69. -- part name: Prev
  70. ----- HyperTalk script -----
  71. on mouseUp
  72.   visual effect wipe right
  73.   go to previous card
  74. end mouseUp
  75.  
  76.  
  77.  
  78. -- part 6 (button)
  79. -- low flags: 00
  80. -- high flags: 0000
  81. -- rect: left=267 top=317 right=342 bottom=294
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 1013 / 1013
  84. -- text alignment: 1
  85. -- font id: 0
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: Next
  90. ----- HyperTalk script -----
  91. on mouseUp
  92.   visual effect wipe left
  93.   go to next card
  94. end mouseUp
  95.  
  96.  
  97.  
  98. -- part 7 (button)
  99. -- low flags: 00
  100. -- high flags: 0000
  101. -- rect: left=475 top=314 right=342 bottom=512
  102. -- title width / last selected line: 0
  103. -- icon id / first selected line: 1012 / 1012
  104. -- text alignment: 1
  105. -- font id: 0
  106. -- text size: 12
  107. -- style flags: 0
  108. -- line height: 16
  109. -- part name: Return
  110. ----- HyperTalk script -----
  111. on mouseUp
  112.   visual effect iris close
  113.   pop card
  114. end mouseUp
  115.  
  116.  
  117.  
  118. -- part 8 (button)
  119. -- low flags: 00
  120. -- high flags: 0000
  121. -- rect: left=0 top=313 right=342 bottom=32
  122. -- title width / last selected line: 0
  123. -- icon id / first selected line: 21700 / 21700
  124. -- text alignment: 1
  125. -- font id: 0
  126. -- text size: 12
  127. -- style flags: 0
  128. -- line height: 16
  129. -- part name: Home
  130. ----- HyperTalk script -----
  131. on mouseUp
  132.   visual effect iris open
  133.   go Home
  134. end mouseUp
  135.  
  136.  
  137.  
  138. -- part 9 (field)
  139. -- low flags: 00
  140. -- high flags: 4000
  141. -- rect: left=139 top=0 right=16 bottom=304
  142. -- title width / last selected line: 0
  143. -- icon id / first selected line: 0 / 0
  144. -- text alignment: 1
  145. -- font id: 20
  146. -- text size: 12
  147. -- style flags: 256
  148. -- line height: 16
  149. -- part name: name
  150.  
  151.  
  152. -- part 10 (field)
  153. -- low flags: 00
  154. -- high flags: 4000
  155. -- rect: left=437 top=0 right=16 bottom=496
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 1
  159. -- font id: 20
  160. -- text size: 12
  161. -- style flags: 256
  162. -- line height: 16
  163. -- part name: birth date
  164.  
  165.  
  166. -- part 11 (field)
  167. -- low flags: 01
  168. -- high flags: 4007
  169. -- rect: left=8 top=49 right=258 bottom=69
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 65535
  173. -- font id: 20
  174. -- text size: 10
  175. -- style flags: 1024
  176. -- line height: 13
  177. -- part name: date
  178.  
  179.  
  180. -- part 12 (field)
  181. -- low flags: 01
  182. -- high flags: 4007
  183. -- rect: left=79 top=49 right=258 bottom=130
  184. -- title width / last selected line: 0
  185. -- icon id / first selected line: 0 / 0
  186. -- text alignment: 0
  187. -- font id: 20
  188. -- text size: 10
  189. -- style flags: 1024
  190. -- line height: 13
  191. -- part name: age
  192.  
  193.  
  194. -- part 13 (field)
  195. -- low flags: 01
  196. -- high flags: 4007
  197. -- rect: left=139 top=49 right=258 bottom=193
  198. -- title width / last selected line: 0
  199. -- icon id / first selected line: 0 / 0
  200. -- text alignment: 0
  201. -- font id: 20
  202. -- text size: 10
  203. -- style flags: 1024
  204. -- line height: 13
  205. -- part name: weight
  206.  
  207.  
  208. -- part 14 (field)
  209. -- low flags: 01
  210. -- high flags: 4007
  211. -- rect: left=200 top=49 right=258 bottom=254
  212. -- title width / last selected line: 0
  213. -- icon id / first selected line: 0 / 0
  214. -- text alignment: 0
  215. -- font id: 20
  216. -- text size: 10
  217. -- style flags: 1024
  218. -- line height: 13
  219. -- part name: height
  220.  
  221.  
  222. -- part 18 (field)
  223. -- low flags: 00
  224. -- high flags: 4000
  225. -- rect: left=407 top=0 right=16 bottom=437
  226. -- title width / last selected line: 0
  227. -- icon id / first selected line: 0 / 0
  228. -- text alignment: 1
  229. -- font id: 20
  230. -- text size: 12
  231. -- style flags: 256
  232. -- line height: 16
  233. -- part name: sex
  234.  
  235.  
  236. -- part 21 (field)
  237. -- low flags: 00
  238. -- high flags: 4000
  239. -- rect: left=305 top=0 right=16 bottom=407
  240. -- title width / last selected line: 0
  241. -- icon id / first selected line: 0 / 0
  242. -- text alignment: 1
  243. -- font id: 20
  244. -- text size: 12
  245. -- style flags: 256
  246. -- line height: 16
  247. -- part name: hospital number
  248.  
  249.  
  250. -- part 24 (field)
  251. -- low flags: 00
  252. -- high flags: 4000
  253. -- rect: left=465 top=39 right=54 bottom=504
  254. -- title width / last selected line: 0
  255. -- icon id / first selected line: 0 / 0
  256. -- text alignment: 1
  257. -- font id: 20
  258. -- text size: 10
  259. -- style flags: 0
  260. -- line height: 13
  261. -- part name: fh
  262.  
  263.  
  264. -- part 25 (field)
  265. -- low flags: 00
  266. -- high flags: 4000
  267. -- rect: left=465 top=54 right=69 bottom=504
  268. -- title width / last selected line: 0
  269. -- icon id / first selected line: 0 / 0
  270. -- text alignment: 1
  271. -- font id: 20
  272. -- text size: 10
  273. -- style flags: 0
  274. -- line height: 13
  275. -- part name: mh
  276.  
  277.  
  278. -- part 26 (field)
  279. -- low flags: 01
  280. -- high flags: 4007
  281. -- rect: left=260 top=49 right=258 bottom=314
  282. -- title width / last selected line: 0
  283. -- icon id / first selected line: 0 / 0
  284. -- text alignment: 0
  285. -- font id: 20
  286. -- text size: 10
  287. -- style flags: 1024
  288. -- line height: 13
  289. -- part name: growth velocity
  290.  
  291.  
  292. -- part 29 (field)
  293. -- low flags: 81
  294. -- high flags: 4007
  295. -- rect: left=260 top=49 right=258 bottom=314
  296. -- title width / last selected line: 0
  297. -- icon id / first selected line: 0 / 0
  298. -- text alignment: 0
  299. -- font id: 20
  300. -- text size: 10
  301. -- style flags: 1024
  302. -- line height: 13
  303. -- part name: bone ages
  304.  
  305.  
  306. -- part 31 (field)
  307. -- low flags: 00
  308. -- high flags: 0000
  309. -- rect: left=260 top=25 right=49 bottom=309
  310. -- title width / last selected line: 0
  311. -- icon id / first selected line: 0 / 0
  312. -- text alignment: 1
  313. -- font id: 20
  314. -- text size: 10
  315. -- style flags: 256
  316. -- line height: 11
  317. -- part name: title
  318.  
  319.  
  320. -- part 33 (field)
  321. -- low flags: 00
  322. -- high flags: 4000
  323. -- rect: left=422 top=74 right=89 bottom=443
  324. -- title width / last selected line: 0
  325. -- icon id / first selected line: 0 / 0
  326. -- text alignment: 1
  327. -- font id: 20
  328. -- text size: 10
  329. -- style flags: 256
  330. -- line height: 13
  331. -- part name: minimum interval
  332.  
  333.  
  334. -- part 36 (button)
  335. -- low flags: 00
  336. -- high flags: A004
  337. -- rect: left=489 top=79 right=96 bottom=512
  338. -- title width / last selected line: 0
  339. -- icon id / first selected line: 0 / 0
  340. -- text alignment: 1
  341. -- font id: 0
  342. -- text size: 12
  343. -- style flags: 0
  344. -- line height: 16
  345. -- part name: OK
  346. ----- HyperTalk script -----
  347. on mouseUp
  348.   hide field "minimum interval"
  349.   hide field "interval title"
  350.   hide background button "ok"
  351.   hide field "yrs conversion"
  352. end mouseUp
  353.  
  354.  
  355.  
  356. -- part 37 (field)
  357. -- low flags: 01
  358. -- high flags: 0000
  359. -- rect: left=442 top=74 right=89 bottom=489
  360. -- title width / last selected line: 0
  361. -- icon id / first selected line: 0 / 0
  362. -- text alignment: 0
  363. -- font id: 20
  364. -- text size: 10
  365. -- style flags: 256
  366. -- line height: 13
  367. -- part name: interval title
  368.  
  369.  
  370. -- part 38 (field)
  371. -- low flags: 01
  372. -- high flags: 0000
  373. -- rect: left=422 top=88 right=101 bottom=483
  374. -- title width / last selected line: 0
  375. -- icon id / first selected line: 0 / 0
  376. -- text alignment: 0
  377. -- font id: 20
  378. -- text size: 10
  379. -- style flags: 256
  380. -- line height: 13
  381. -- part name: yrs conversion
  382.  
  383.  
  384. -- part 41 (button)
  385. -- low flags: 00
  386. -- high flags: 2000
  387. -- rect: left=30 top=316 right=342 bottom=59
  388. -- title width / last selected line: 0
  389. -- icon id / first selected line: 32462 / 32462
  390. -- text alignment: 1
  391. -- font id: 0
  392. -- text size: 12
  393. -- style flags: 0
  394. -- line height: 16
  395. -- part name: Comments
  396. ----- HyperTalk script -----
  397. on mousedown
  398.   global identification
  399.   put the mouseloc into myPlace
  400.   put item 1 of myPlace - 13 into horiz
  401.   put item 2 of myPlace - 100 into vert
  402.   put field "name" && field "hospital number" into identification
  403.   get PopUpMenu("About this stack;Instructions;Velocity Calculations;Age Calculations;Units of measure;Alignment of data", 1, vert, horiz)
  404.  
  405.   put it into Menuitem
  406.  
  407.   if menuitem is 1 then
  408.     go card "comment 5"
  409.   end if
  410.  
  411.   if menuitem is 2 then
  412.     go card "comment 4"
  413.   end if
  414.  
  415.   if menuitem is 3 then
  416.     go card "comment 3"
  417.   end if
  418.  
  419.   if menuitem is 4 then
  420.     go card "comment 2"
  421.   end if
  422.  
  423.   if menuitem is 5 then
  424.     go card "comment1"
  425.   end if
  426.  
  427.   if menuitem is 6 then
  428.     go card "comment 6"
  429.   end if
  430.  
  431. end mousedown
  432.  
  433.  
  434. -- part 43 (field)
  435. -- low flags: 80
  436. -- high flags: 0001
  437. -- rect: left=86 top=135 right=291 bottom=348
  438. -- title width / last selected line: 0
  439. -- icon id / first selected line: 0 / 0
  440. -- text alignment: 0
  441. -- font id: 20
  442. -- text size: 12
  443. -- style flags: 256
  444. -- line height: 16
  445. -- part name: instructions
  446.  
  447.  
  448. -- part 44 (button)
  449. -- low flags: 80
  450. -- high flags: A004
  451. -- rect: left=200 top=263 right=287 bottom=250
  452. -- title width / last selected line: 0
  453. -- icon id / first selected line: 0 / 0
  454. -- text alignment: 1
  455. -- font id: 0
  456. -- text size: 12
  457. -- style flags: 0
  458. -- line height: 16
  459. -- part name: OK
  460. ----- HyperTalk script -----
  461. on mouseUp
  462.   hide field "instructions"
  463.   hide background button id 44
  464. end mouseUp
  465.  
  466.  
  467.  
  468. -- part 45 (field)
  469. -- low flags: 80
  470. -- high flags: 0000
  471. -- rect: left=17 top=0 right=15 bottom=140
  472. -- title width / last selected line: 0
  473. -- icon id / first selected line: 0 / 0
  474. -- text alignment: 0
  475. -- font id: 20
  476. -- text size: 12
  477. -- style flags: 256
  478. -- line height: 16
  479. -- part name: 
  480.  
  481.  
  482. -- part 48 (button)
  483. -- low flags: 80
  484. -- high flags: 8000
  485. -- rect: left=145 top=257 right=274 bottom=168
  486. -- title width / last selected line: 0
  487. -- icon id / first selected line: 0 / 0
  488. -- text alignment: 1
  489. -- font id: 0
  490. -- text size: 12
  491. -- style flags: 0
  492. -- line height: 16
  493. -- part name: lbs
  494. ----- HyperTalk script -----
  495. on mouseUp
  496.   put the number of lines in field "date" into number
  497.   repeat with i = 1 to number
  498.     if line i of field "weight" is empty then next repeat
  499.     put line i of field "weight" into weight
  500.     set the numberFormat to "0.00"
  501.     put (weight/2.2) into line i of field "weight"
  502.   end repeat
  503.   hide background button "lbs"
  504.   show background button "kgs"
  505. end mouseUp
  506.  
  507.  
  508.  
  509. -- part 49 (button)
  510. -- low flags: 00
  511. -- high flags: 8000
  512. -- rect: left=145 top=257 right=274 bottom=168
  513. -- title width / last selected line: 0
  514. -- icon id / first selected line: 0 / 0
  515. -- text alignment: 1
  516. -- font id: 0
  517. -- text size: 12
  518. -- style flags: 0
  519. -- line height: 16
  520. -- part name: kgs
  521. ----- HyperTalk script -----
  522. on mouseUp
  523.  
  524.   put the number of lines in field "date" into number
  525.   repeat with i = 1 to number
  526.     if line i of field "weight" is empty then next repeat
  527.     put line i of field "weight" into weight
  528.     set the numberFormat to "0.00"
  529.  
  530.     put (weight*2.2) into line i of field "weight"
  531.   end repeat
  532.   hide background button "kgs"
  533.   show background button "lbs"
  534. end mouseUp
  535.  
  536.  
  537.  
  538. -- part 50 (button)
  539. -- low flags: 80
  540. -- high flags: 8000
  541. -- rect: left=206 top=257 right=274 bottom=229
  542. -- title width / last selected line: 0
  543. -- icon id / first selected line: 0 / 0
  544. -- text alignment: 1
  545. -- font id: 0
  546. -- text size: 12
  547. -- style flags: 0
  548. -- line height: 16
  549. -- part name: in
  550. ----- HyperTalk script -----
  551. on mouseUp
  552.   put the number of lines in field "date" into number
  553.   repeat with i = 1 to number
  554.     if line i of field "height" is empty then next repeat
  555.     put line i of field "height" into height
  556.     set the numberFormat to "0.00"
  557.  
  558.     put (height*2.54) into line i of field "height"
  559.   end repeat
  560.  
  561.   hide background button "in"
  562.   show background button "cm"
  563.  
  564. end mouseUp
  565.  
  566.  
  567.  
  568. -- part 51 (button)
  569. -- low flags: 00
  570. -- high flags: 8000
  571. -- rect: left=206 top=257 right=274 bottom=229
  572. -- title width / last selected line: 0
  573. -- icon id / first selected line: 0 / 0
  574. -- text alignment: 1
  575. -- font id: 0
  576. -- text size: 12
  577. -- style flags: 0
  578. -- line height: 16
  579. -- part name: cm
  580. ----- HyperTalk script -----
  581. on mouseUp
  582.   put the number of lines in field "date" into number
  583.   repeat with i = 1 to number
  584.     if line i of field "height" is empty then next repeat
  585.     put line i of field "height" into height
  586.     set the numberFormat to "0.00"
  587.  
  588.     put (height/2.54) into line i of field "height"
  589.   end repeat
  590.   hide background button "cm"
  591.   show background button "in"
  592.  
  593. end mouseUp
  594.  
  595.  
  596.  
  597. -- part 53 (button)
  598. -- low flags: 00
  599. -- high flags: A002
  600. -- rect: left=293 top=315 right=342 bottom=360
  601. -- title width / last selected line: 0
  602. -- icon id / first selected line: 0 / 0
  603. -- text alignment: 1
  604. -- font id: 0
  605. -- text size: 12
  606. -- style flags: 0
  607. -- line height: 16
  608. -- part name: Edit data
  609. ----- HyperTalk script -----
  610. on mouseUp
  611.   set lockText of field "date" to false
  612.   set lockText of field "age" to false
  613.   set lockText of field "weight" to false
  614.   set lockText of field "height" to false
  615.   set lockText of field "bone ages" to false
  616.   set lockText of field "Phallus Size" to false
  617.   set lockText of field "Testes Volume" to false
  618.   set lockText of field "Pubic Hair" to false
  619.   set lockText of field "Breasts" to false
  620.   hide background button "Edit data"
  621.   show background button "Lock data"
  622. end mouseUp
  623.  
  624.  
  625.  
  626. -- part 54 (button)
  627. -- low flags: 80
  628. -- high flags: A002
  629. -- rect: left=293 top=315 right=342 bottom=361
  630. -- title width / last selected line: 0
  631. -- icon id / first selected line: 0 / 0
  632. -- text alignment: 1
  633. -- font id: 0
  634. -- text size: 12
  635. -- style flags: 0
  636. -- line height: 16
  637. -- part name: Lock data
  638. ----- HyperTalk script -----
  639. on mouseUp
  640.   set lockText of field "date" to true
  641.   set lockText of field "age" to true
  642.   set lockText of field "weight" to true
  643.   set lockText of field "height" to true
  644.   set lockText of field "bone ages" to true
  645.   set lockText of field "Phallus Size" to true
  646.   set lockText of field "Testes Volume" to true
  647.   set lockText of field "Pubic Hair" to true
  648.   set lockText of field "Breasts" to true
  649.   hide background button "Lock data"
  650.   show background button "Edit data"
  651.  
  652. end mouseUp
  653.  
  654.  
  655.  
  656. -- part 55 (field)
  657. -- low flags: 00
  658. -- high flags: 4000
  659. -- rect: left=3 top=277 right=294 bottom=68
  660. -- title width / last selected line: 0
  661. -- icon id / first selected line: 0 / 0
  662. -- text alignment: 1
  663. -- font id: 20
  664. -- text size: 12
  665. -- style flags: 256
  666. -- line height: 16
  667. -- part name: enter date
  668.  
  669.  
  670. -- part 56 (field)
  671. -- low flags: 00
  672. -- high flags: 4000
  673. -- rect: left=139 top=276 right=294 bottom=193
  674. -- title width / last selected line: 0
  675. -- icon id / first selected line: 0 / 0
  676. -- text alignment: 1
  677. -- font id: 20
  678. -- text size: 12
  679. -- style flags: 256
  680. -- line height: 16
  681. -- part name: enter weight
  682.  
  683.  
  684. -- part 57 (field)
  685. -- low flags: 00
  686. -- high flags: 4000
  687. -- rect: left=199 top=276 right=294 bottom=253
  688. -- title width / last selected line: 0
  689. -- icon id / first selected line: 0 / 0
  690. -- text alignment: 1
  691. -- font id: 20
  692. -- text size: 12
  693. -- style flags: 256
  694. -- line height: 16
  695. -- part name: enter height
  696.  
  697.  
  698. -- part 58 (field)
  699. -- low flags: 00
  700. -- high flags: 4000
  701. -- rect: left=260 top=276 right=294 bottom=314
  702. -- title width / last selected line: 0
  703. -- icon id / first selected line: 0 / 0
  704. -- text alignment: 1
  705. -- font id: 20
  706. -- text size: 12
  707. -- style flags: 256
  708. -- line height: 16
  709. -- part name: enter bone age
  710.  
  711.  
  712. -- part 59 (button)
  713. -- low flags: 00
  714. -- high flags: A002
  715. -- rect: left=165 top=315 right=342 bottom=242
  716. -- title width / last selected line: 0
  717. -- icon id / first selected line: 0 / 0
  718. -- text alignment: 1
  719. -- font id: 0
  720. -- text size: 12
  721. -- style flags: 0
  722. -- line height: 16
  723. -- part name: Enter data
  724. ----- HyperTalk script -----
  725. on mouseUp
  726.   get the location of field "enter date"
  727.   put field "birth date" into birthdate
  728.   click at it
  729.   if field "enter date" is empty then
  730.     answer "Enter the date and growth data!" with "OK"
  731.   else
  732.     put the number of lines of field "date" into linumber
  733.     put (linumber-15) into setscroll
  734.  
  735.     if setscroll>0 then
  736.       set scroll of field "date" to setscroll*13
  737.     end if
  738.     get the scroll of field "date"
  739.     goalign
  740.     get field "enter date"
  741.     convert it to short date
  742.     put it into line (linumber+1) of field "date"
  743.  
  744.     convert birthdate to seconds
  745.     convert it to seconds
  746.     subtract birthdate from it
  747.     divide it by (365.25*24*6*6)
  748.     put round(it) into age
  749.     divide age by (100)
  750.     put age into line (linumber+1) of field "age"
  751.  
  752.     put field "enter weight" into line (linumber+1) of field "weight"
  753.     put field "enter height" into line (linumber+1) of field "height"
  754.     put field "enter bone age" into line (linumber+1) of field "bone ages"
  755.     put field "eBreasts" into line(linumber+1) of field "Breasts"
  756.     put field "ePubic Hair" into line(linumber+1) of field "Pubic Hair"
  757.     if field "sex" is "f" and field "Testes" is not empty then
  758.       answer "Females usually do not have testes" with "OK"
  759.       put empty into field "testes"
  760.     end if
  761.     put field "Testes" into line(linumber+1) of field "Testes Volume"
  762.     put field "ePhallus Size" into line(linumber+1) of field "Phallus Size"
  763.     put empty into field "enter date"
  764.     put empty into field "enter weight"
  765.     put empty into field "enter height"
  766.     put empty into field "enter bone age"
  767.     put empty into field "eBreasts"
  768.     put empty into field "ePubic Hair"
  769.     put empty into field "Testes"
  770.     put empty into field "ePhallus Size"
  771.  
  772.     get the location of field "enter date"
  773.     click at it
  774.   end if
  775.  
  776.  
  777. end mouseUp
  778.  
  779.  
  780.  
  781. -- part 60 (button)
  782. -- low flags: 00
  783. -- high flags: A002
  784. -- rect: left=92 top=315 right=342 bottom=166
  785. -- title width / last selected line: 0
  786. -- icon id / first selected line: 0 / 0
  787. -- text alignment: 1
  788. -- font id: 0
  789. -- text size: 12
  790. -- style flags: 0
  791. -- line height: 16
  792. -- part name: Functions
  793. ----- HyperTalk script -----
  794. on mousedown
  795.   global identification, ages, plotdata, currentfield
  796.   put the mouseloc into myPlace
  797.   put item 1 of myPlace - 13 into horiz
  798.   put item 2 of myPlace - 150 into vert
  799.   put "Plot Data;Calculate Ages;Calculate Height Velocity;Show velocity time interval;Height Z Scores;Height Velocity Z Scores;Height age; Γêé height age over Γêé bone age;Report" into menufunc
  800.   get PopUpMenu(menufunc, 1, vert, horiz)
  801.   put field "name" && field "hospital number" into identification
  802.   put it into Menuitem
  803.  
  804.   if menuitem is 1 then
  805.  
  806.     get the number of lines in field "age"
  807.     put it into ages
  808.     get field "sex"
  809.     if it is empty then
  810.       ask "what is the sex of this patient (m or f)?"
  811.       put it into field "sex"
  812.     end if
  813.     put "true" into plotdata
  814.     if it is "m" then
  815.       go to card "Male plot"
  816.     end if
  817.     if it is "f" then
  818.       go to card "Female plot"
  819.     end if
  820.   end if
  821.  
  822.   if menuitem is 2 then
  823.     put number of lines in field "date" into maxdate
  824.     repeat with i = 1 to maxdate
  825.       put line i of field "date" into temp
  826.       if temp is not empty then
  827.         convert temp to short date
  828.         put temp into line i of field "date"
  829.       end if
  830.       put field "birth date" into birthdate
  831.       if temp is not empty then
  832.         convert birthdate to seconds
  833.         convert temp to seconds
  834.         subtract birthdate from temp
  835.         divide temp by (365.25*24*6*6)
  836.         put round(temp) into age
  837.         divide age by (100)
  838.         put age into line i of field "age"
  839.       end if
  840.     end repeat
  841.   end if
  842.  
  843.   if menuitem is 3 then
  844.     hide field currentfield
  845.     put "growth velocity" into currentfield
  846.     put currentfield into field "title"
  847.     show field currentfield
  848.     put empty into field "growth velocity"
  849.  
  850.     put the number of lines of field "date" into number
  851.     set the numberformat to "0.##"
  852.     put (field "minimum interval"/12) && "yrs" into field "yrs conversion"
  853.     if field "minimum interval" < 1 then
  854.       repeat with i=1 to (number-1)
  855.         if line i of field "height" is empty then next repeat
  856.         put (i+1) into steps
  857.         repeat with j=steps to number
  858.           if line j of field "height" is empty then next repeat
  859.           put ((line(j) of field "height")- (line i of field "height")) into deltaheight
  860.           put ((line(j) of field "age")- (line i of field "age")) into deltaage
  861.           put (deltaheight/deltaage) into line (j) of field "growth velocity"
  862.           if (line (j) of field "height") is not empty then exit repeat
  863.         end repeat
  864.       end repeat
  865.  
  866.     else
  867.  
  868.       repeat with i = number down to 1
  869.         if line i of field "height" is empty then next repeat
  870.         put line i of field "age" into topage
  871.  
  872.         put (number-(number-i)-1) into start
  873.         repeat with j= start down to 1
  874.           if line j of field "height" is empty then next repeat
  875.           put line j of field "age" into nextage
  876.           put (topage-nextage) into deltaage
  877.           if deltaage < (field "minimum interval"/12) then next repeat
  878.  
  879.           put ((line i of field "height")- (line j of field "height")) into deltaheight
  880.           put (deltaheight/deltaage) into line (i) of field "growth velocity"
  881.           exit repeat
  882.  
  883.         end repeat
  884.       end repeat
  885.     end if
  886.   end if
  887.  
  888.   if menuitem is 4 then
  889.     show field "minimum interval"
  890.     put "months" into field "interval title"
  891.     show field "interval title"
  892.     show background button "ok"
  893.     show field "yrs conversion"
  894.   end if
  895.  
  896.   if menuitem >4 then
  897.     answer "Not implemented at this time!" with "OK"
  898.   end if
  899.  
  900.  
  901. end mousedown
  902.  
  903.  
  904. -- part 61 (button)
  905. -- low flags: 00
  906. -- high flags: 8002
  907. -- rect: left=58 top=315 right=342 bottom=93
  908. -- title width / last selected line: 0
  909. -- icon id / first selected line: 0 / 0
  910. -- text alignment: 1
  911. -- font id: 0
  912. -- text size: 12
  913. -- style flags: 0
  914. -- line height: 16
  915. -- part name: Files
  916. ----- HyperTalk script -----
  917. on mousedown
  918.   global identification, plotdata
  919.   put the mouseloc into myPlace
  920.   put item 1 of myPlace - 13 into horiz
  921.   put item 2 of myPlace - 125 into vert
  922.   put "Patient Index;Patient Medicines;Growth Patterns;Find what?;Align data lines;Go to male charts;Go to female charts" into menufunc
  923.   get PopUpMenu(Menufunc, 1, vert, horiz)
  924.   put field "name" && field "hospital number" into identification
  925.   put it into Menuitem
  926.  
  927.   if menuitem is 3 then
  928.     go to card id 5522
  929.   end if
  930.  
  931.   if menuitem is 1 then
  932.     visual effect barn door close slow
  933.     go "Patient names"
  934.   end if
  935.  
  936.   if menuitem is 2 then
  937.     Answer "Not available for this copy"
  938.   end if
  939.  
  940.   if menuitem is 4 then
  941.     ask "What do you want to find?"
  942.     find it
  943.     if it is "OK" then
  944.       doMenu "Find..."
  945.     end if
  946.   end if
  947.  
  948.   if menuitem is 5 then
  949.     goalign
  950.   end if
  951.  
  952.   if menuitem is 6 then
  953.     put "false" into plotdata
  954.     go to card "Male plot"
  955.   end if
  956.  
  957.   if menuitem is 7 then
  958.     put "false" into plotdata
  959.     go to card "Female plot"
  960.   end if
  961. end mousedown
  962.  
  963.  
  964.  
  965. -- part 62 (field)
  966. -- low flags: 00
  967. -- high flags: 4000
  968. -- rect: left=325 top=276 right=292 bottom=368
  969. -- title width / last selected line: 0
  970. -- icon id / first selected line: 0 / 0
  971. -- text alignment: 1
  972. -- font id: 20
  973. -- text size: 12
  974. -- style flags: 256
  975. -- line height: 16
  976. -- part name: eBreasts
  977.  
  978.  
  979. -- part 63 (field)
  980. -- low flags: 00
  981. -- high flags: 4000
  982. -- rect: left=371 top=276 right=292 bottom=414
  983. -- title width / last selected line: 0
  984. -- icon id / first selected line: 0 / 0
  985. -- text alignment: 1
  986. -- font id: 20
  987. -- text size: 12
  988. -- style flags: 256
  989. -- line height: 16
  990. -- part name: ePubic Hair
  991.  
  992.  
  993. -- part 64 (field)
  994. -- low flags: 00
  995. -- high flags: 4000
  996. -- rect: left=417 top=276 right=292 bottom=460
  997. -- title width / last selected line: 0
  998. -- icon id / first selected line: 0 / 0
  999. -- text alignment: 1
  1000. -- font id: 20
  1001. -- text size: 12
  1002. -- style flags: 256
  1003. -- line height: 16
  1004. -- part name: Testes
  1005.  
  1006.  
  1007. -- part 65 (field)
  1008. -- low flags: 00
  1009. -- high flags: 4000
  1010. -- rect: left=463 top=276 right=292 bottom=506
  1011. -- title width / last selected line: 0
  1012. -- icon id / first selected line: 0 / 0
  1013. -- text alignment: 1
  1014. -- font id: 20
  1015. -- text size: 12
  1016. -- style flags: 256
  1017. -- line height: 16
  1018. -- part name: ePhallus Size
  1019.  
  1020.  
  1021. -- part 66 (button)
  1022. -- low flags: 00
  1023. -- high flags: A002
  1024. -- rect: left=359 top=315 right=342 bottom=435
  1025. -- title width / last selected line: 0
  1026. -- icon id / first selected line: 0 / 0
  1027. -- text alignment: 1
  1028. -- font id: 0
  1029. -- text size: 12
  1030. -- style flags: 0
  1031. -- line height: 16
  1032. -- part name: Other data
  1033. ----- HyperTalk script -----
  1034. on mouseDown
  1035.   global currentfield
  1036.   put the mouseloc into myPlace
  1037.   put item 1 of myPlace - 25 into horiz
  1038.   put item 2 of myPlace - 85 into vert
  1039.   put "Bone Ages;Breast Maturation;Pubic Hair;Testes Size;Phallus Size" into menufunc
  1040.   get PopUpMenu(Menufunc, 1, vert, horiz)
  1041.   put it into menuitem
  1042.  
  1043.  
  1044.   if menuitem is 1 then
  1045.     hide field currentfield
  1046.     put "bone ages" into currentfield
  1047.     put currentfield into field "title"
  1048.     show field currentfield
  1049.   end if
  1050.  
  1051.   if menuitem is 2 then
  1052.     hide field currentfield
  1053.     put "Breasts" into currentfield
  1054.     put currentfield into field "title"
  1055.     show field currentfield
  1056.   end if
  1057.  
  1058.   if menuitem is 3 then
  1059.     hide field currentfield
  1060.     put "Pubic Hair" into currentfield
  1061.     put currentfield into field "title"
  1062.     show field currentfield
  1063.   end if
  1064.  
  1065.   if menuitem is 4 then
  1066.     hide field currentfield
  1067.     put "Testes Volume" into currentfield
  1068.     put currentfield into field "title"
  1069.     show field currentfield
  1070.   end if
  1071.  
  1072.   if menuitem is 5 then
  1073.     hide field currentfield
  1074.     put "Phallus Size" into currentfield
  1075.     put currentfield into field "title"
  1076.     show field currentfield
  1077.   end if
  1078.  
  1079.  
  1080. end mouseDown
  1081.  
  1082.  
  1083.  
  1084. -- part 67 (field)
  1085. -- low flags: 81
  1086. -- high flags: 4007
  1087. -- rect: left=260 top=49 right=258 bottom=314
  1088. -- title width / last selected line: 0
  1089. -- icon id / first selected line: 0 / 0
  1090. -- text alignment: 0
  1091. -- font id: 20
  1092. -- text size: 10
  1093. -- style flags: 1024
  1094. -- line height: 13
  1095. -- part name: Breasts
  1096.  
  1097.  
  1098. -- part 68 (field)
  1099. -- low flags: 81
  1100. -- high flags: 4007
  1101. -- rect: left=260 top=49 right=258 bottom=314
  1102. -- title width / last selected line: 0
  1103. -- icon id / first selected line: 0 / 0
  1104. -- text alignment: 0
  1105. -- font id: 20
  1106. -- text size: 10
  1107. -- style flags: 1024
  1108. -- line height: 13
  1109. -- part name: Pubic Hair
  1110.  
  1111.  
  1112. -- part 69 (field)
  1113. -- low flags: 81
  1114. -- high flags: 4007
  1115. -- rect: left=260 top=49 right=258 bottom=314
  1116. -- title width / last selected line: 0
  1117. -- icon id / first selected line: 0 / 0
  1118. -- text alignment: 0
  1119. -- font id: 20
  1120. -- text size: 10
  1121. -- style flags: 1024
  1122. -- line height: 13
  1123. -- part name: Testes Volume
  1124.  
  1125.  
  1126. -- part 70 (field)
  1127. -- low flags: 81
  1128. -- high flags: 4007
  1129. -- rect: left=260 top=49 right=258 bottom=314
  1130. -- title width / last selected line: 0
  1131. -- icon id / first selected line: 0 / 0
  1132. -- text alignment: 0
  1133. -- font id: 20
  1134. -- text size: 10
  1135. -- style flags: 1024
  1136. -- line height: 13
  1137. -- part name: Phallus Size
  1138.  
  1139.  
  1140. -- part 74 (field)
  1141. -- low flags: 80
  1142. -- high flags: 0000
  1143. -- rect: left=148 top=299 right=315 bottom=242
  1144. -- title width / last selected line: 0
  1145. -- icon id / first selected line: 0 / 0
  1146. -- text alignment: 0
  1147. -- font id: 3
  1148. -- text size: 12
  1149. -- style flags: 0
  1150. -- line height: 16
  1151. -- part name: units
  1152.